package com.healthshare.busi.icenter;

import com.healthshare.parse.RetCodeParse;
import com.palmedia.framework.business.BaseBusi;
import com.palmedia.framework.myinterface.UiCallBack;
import com.palmedia.framework.parse.BaseParse;
/**
 * @author xudeliang
 * 完善资料
 */
public class EditprofileBusi extends BaseBusi
{

	//请求路径：/center/editprofile?
	private  String  tail = "center/editprofile.php";
	
	//post
	public String nickname = "";
	public byte[] logodata = null;
	public String  sex;

	
	public EditprofileBusi(UiCallBack bCallBack)
	{
		super(bCallBack);
	}
	
	public void iExecute()
    {
		reqParam = tail;
		
		String tmpdata = "nickname="+nickname+"&sex="+sex;
		if(logodata!=null)
		{
			buffer = new byte[tmpdata.getBytes().length+logodata.length];
	
			System.arraycopy(tmpdata.getBytes(), 0, buffer, 0, tmpdata.getBytes().length);
			
			System.arraycopy(logodata, 0, buffer, tmpdata.getBytes().length, logodata.length);
		}
		else
		{
			buffer = tmpdata.getBytes();
		}
    	super.iExecute();
    }
	
	@Override
	protected BaseParse parseResult(byte[] data)
	{
		RetCodeParse	ls = new RetCodeParse();
		ls.Parse(data);
		return ls;
	}
	
	
	
}
